<%@ page language="java" %>

<%@ page import="java.util.ArrayList, 
                com.scalar.chiptrack.commons.SessionKeys,
                com.scalar.chiptrack.operations.LotView,
                com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/jsp/operations/lot_shipping_info.jsp"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<html:html locale="true">

<HEAD><TITLE>Scalarsoft - On Track</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
</HEAD>

<body bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<SCRIPT language="JavaScript">
function openLot() {
    newWindow = window.open('<%=chipTracContext%>/jsp/engineering/lot_trace_info.jsp','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=570,height=420,resizable=no');
    newWindow.moveTo(130,140);
    newWindow.focus();
}

function loadVendorLocations() {
    if (document.lotShippingInfoForm.nextProcessStepId.value != -1) {
        formAction = "<%=chipTracContext%>/lotShippingInfo.do?action=loadVendorLocations"
        document.lotShippingInfoForm.action=formAction;
        document.lotShippingInfoForm.submit();
    }
}

function sumbitForm() {
    if (document.lotShippingInfoForm.locationId.value != -1) {
        formAction = "<%=chipTracContext%>/lotShippingInfo.do?action=submit"
        document.lotShippingInfoForm.action=formAction;
        document.lotShippingInfoForm.submit();
    }
}
</SCRIPT>

<%
    ArrayList processTimeTypes = new ArrayList();
    processTimeTypes.add (new org.apache.struts.util.LabelValueBean ("EXPRESS", "EXPRESS"));
    processTimeTypes.add (new org.apache.struts.util.LabelValueBean ("NORMAL", "NORMAL"));
    pageContext.setAttribute("processTimeTypes", processTimeTypes);
%>


<!-- Top Header Start-->
<%@include file="/jsp/includes/header.jsp"  %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>

  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

        <!-- Side Navigation start -->
        <%@include file="/jsp/operations/operations_menu.jsp" %>
        <!-- end of the side navigations -->

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->

<center><span class="NArialW">Lot Shipping Instructions</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10>

<html:form name="lotShippingInfoForm" type="com.scalar.chiptrack.lotshipping.forms.LotShippingInfoForm" action="/lotShippingInfo.do">

 <table border="0" width="90%" align=right>

    <tr><td colspan='2'><chiptrack:errors styleClass='NArialL'/></td></tr>

    <% LotView lview = (LotView) session.getAttribute (SessionKeys.LOT_VIEW); %>
    <tr><td colspan='2'><%--<%@include file="/jsp/engineering/lot_info.jsp" %>--%></td></tr>

    <tr><td colspan='2'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>

    <tr>
        <td width="55%">
            <logic:present name="processStepList">
                <font class='NArialL'>Next Process:&nbsp;&nbsp;</font>
                <html:select name="lotShippingInfoForm" property="nextProcessStepId" styleClass="NArialL" onchange="loadVendorLocations()">
                <html:option value="-1">-- Select Next Step --</html:option>
                <html:options collection="processStepList" property="id" labelProperty="type" />
                </html:select>
            </logic:present>
        </td>

	<td width="45%">
            <font class="NArialL">Process Time: 
            <html:select name="lotShippingInfoForm" property="processTimeType" styleClass="NArialL">
                <html:option value="-1">-- Select Time --</html:option>
                <html:options collection="processTimeTypes" property="value" labelProperty="label"/>
                </html:select>
            </font>
        </td>
    </tr>

    <tr><td colspan='2'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>

    <logic:present name="vendorLocationList">
    <tr><td colspan='2'>
        <font class='NArialL'>Vendor Location :&nbsp;&nbsp;</font>
        <html:select name="lotShippingInfoForm" property="locationId" styleClass="NArialL">
        <html:option value="-1">-- Select Vendor Location --</html:option>
        <html:options collection="vendorLocationList" property="locationID" labelProperty="locationName" />
        </html:select>
    </td></tr>

    <tr><td colspan='2'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=25></td></tr>

    <tr><td colspan='2' align=center>
        <a href="javascript:sumbitForm()"><img src="<%=chipTracContext%>/jsp/includes/images/submit.gif" border="0" onMouseOver="window.status='Click here to send lot shipping instructions';return true"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="<%=chipTracContext%>/lotShipping.do"><img src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" border="0" onMouseOver="window.status='Click here to go back to previous screen';return true"></a>
    </td></tr>
    </logic:present>

</table>

</html:form>

<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

<!-- Footer starts here -->
<%@include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->

</body>
</html:html>
